<!doctype html>



  


<html class="theme-next pisces use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>



<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />















  
  
  <link href="/mytestblog/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />




  
  
  
  

  
    
    
  

  

  

  

  

  
    
    
    <link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  






<link href="/mytestblog/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/mytestblog/css/main.css?v=5.1.0" rel="stylesheet" type="text/css" />


  <meta name="keywords" content="Hexo, NexT" />








  <link rel="shortcut icon" type="image/x-icon" href="/mytestblog/favicon.ico?v=5.1.0" />






<meta name="description" content="About astronomy ,auto observatory ,asteroids ,ccd image process , machine learning!">
<meta property="og:type" content="website">
<meta property="og:title" content="vancky's Blog">
<meta property="og:url" content="http://vancky.oschina.io/mytestblog/index.html">
<meta property="og:site_name" content="vancky's Blog">
<meta property="og:description" content="About astronomy ,auto observatory ,asteroids ,ccd image process , machine learning!">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="vancky's Blog">
<meta name="twitter:description" content="About astronomy ,auto observatory ,asteroids ,ccd image process , machine learning!">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/mytestblog/',
    scheme: 'Pisces',
    sidebar: {"position":"left","display":"post"},
    fancybox: true,
    motion: true,
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://vancky.oschina.io/mytestblog/"/>





  <title> vancky's Blog </title>
</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  














  
  
    
  

  <div class="container one-collumn sidebar-position-left 
   page-home 
 ">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-meta custom-logo">
  

  <div class="custom-logo-site-title">
    <a href="/mytestblog/"  class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <span class="site-title">vancky's Blog</span>
      <span class="logo-line-after"><i></i></span>
    </a>
  </div>
    
      <p class="site-subtitle">astrometry ,mathematicas and computer sciences</p>
    
</div>

<div class="site-nav-toggle">
  <button>
    <span class="btn-bar"></span>
    <span class="btn-bar"></span>
    <span class="btn-bar"></span>
  </button>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/mytestblog/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/mytestblog/archives" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/mytestblog/tags" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            
  <section id="posts" class="posts-expand">
    
      

  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
  <link itemprop="mainEntityOfPage" href="http://vancky.oschina.io/mytestblog/mytestblog/2017/02/23/Chapter2/">

  <span style="display:none" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <meta itemprop="name" content="Li Fan">
    <meta itemprop="description" content="">
    <meta itemprop="image" content="/mytestblog/images/avatar.gif">
  </span>

  <span style="display:none" itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
    <meta itemprop="name" content="vancky's Blog">
    <span style="display:none" itemprop="logo" itemscope itemtype="http://schema.org/ImageObject">
      <img style="display:none;" itemprop="url image" alt="vancky's Blog" src="M27.jpg">
    </span>
  </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                
                <a class="post-title-link" href="/mytestblog/2017/02/23/Chapter2/" itemprop="url">
                  Numerical Optimization -Chapter 2
                </a>
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="Post created" itemprop="dateCreated datePublished" datetime="2017-02-23T12:25:27+08:00">
                Feb 23 2017
              </time>
            

            

            
          </span>

          

          
            
          

          
          

          

          

          

        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <h1 id="Fundmentals-of-Unconstrained-Optimization"><a href="#Fundmentals-of-Unconstrained-Optimization" class="headerlink" title="Fundmentals of Unconstrained Optimization"></a>Fundmentals of Unconstrained Optimization</h1><p>Unconstrained optimization:<br>$$\min_x f(x),x\in R^n , f:\mathbf R^n \rightarrow \mathbf R, n\ge 1$$</p>
<h2 id="What-is-a-solution"><a href="#What-is-a-solution" class="headerlink" title="What is a solution?"></a>What is a solution?</h2><p>Global minimizer : A point $x^\ast $ that satisfied $f(x^\ast)\le f(x)$ for all $x$.<br>Local minimizer :</p>
<ul>
<li>weak : $\exists N , \forall x \in N,f(x^\ast)\le f(x)$,N is a neighborhood of $x^\ast$.</li>
<li>strict : $\exists N , \forall x \in N,x\ne x^\ast f(x^\ast )&lt; f(x)$</li>
<li><p>isolated: $x^\ast $is the only local minimizer in $N$</p>
<h3 id="Local-minimun-with-smooth-function"><a href="#Local-minimun-with-smooth-function" class="headerlink" title="Local minimun with smooth function"></a>Local minimun with smooth function</h3></li>
<li><p>Taylor’s Theorem $f(x+p)=f(x)+\nabla f(x+tp)^T p$</p>
</li>
<li>First-Order Necessary Conditions  $\nabla f(x^\ast )=0$</li>
<li>Second-Order Necessary Conditions  $\nabla f(x^\ast )=0$and $\nabla ^2 f(x^\ast )$is positive semidefinite</li>
<li>Second-Order Sufficient Conditions $\nabla f(x^\ast )=0$and $\nabla ^2 f(x^\ast )$is positive definite</li>
<li>When$ f$ is convex,any local minimizer $x^\ast $is a global minimizer . If in addition$ f$ is differentiable ,then any stationary point $x^\ast $is a global minimizer of $f$ .</li>
</ul>
<h2 id="Overview-of-algorithms"><a href="#Overview-of-algorithms" class="headerlink" title="Overview of algorithms"></a>Overview of algorithms</h2><ul>
<li><p>All algorithms for unconstrained problem require a starting point $x_0$, by the user or the algorithm randomly.</p>
</li>
<li><p>Beginning at $x_0$,algorithms generate a sequence of iterates $ { x_k }_{k=0} ^  \infty  $ .</p>
</li>
<li><p>How to move from one $x_k$ to the next ? The algorithms uses information $f$ at $x_k$ or sometimes information from eariler iterates $x_0,x_1, \cdots,x_{k-1}  $ . Goal is $f(x_k) &gt; f(x_1)$(nonmonotone algorithms change 1 to constant m).</p>
</li>
</ul>
<h3 id="Two-strategies-line-search-and-trust-region"><a href="#Two-strategies-line-search-and-trust-region" class="headerlink" title="Two strategies : line search and trust region"></a>Two strategies : line search and trust region</h3><ul>
<li><p>line search strategy :<br>choose a direction $ p_k $ ,searches along this direction from $x_k$ for $x_{k-1}  $ with lower function value. Solve a subproblem :<br>$$\min _{\alpha&gt;0}f(x_k+\alpha p_k)​$$</p>
</li>
<li><p>trust region strategy:<br>Construct a model funciton $m_k$ approximate $f$ at point $x_k$ within trust region . The goal is to find step $p$ by solving the subproblem:</p>
<p>$$\min_p m_k(x_k+p), \text{where}  x_k+p \text{ belongs trust region}$$</p>
<p>Usually ,the trust region is a ball defined by $||p| |_2\le \Delta$,the scalar $\Delta &gt;0$ is called the trust-region radius. Sometimes ,elliptical and box-shaped trust regions may also be used. The model $m_k$ is defined to be a quadratic function  :</p>
<p>$$m_k(x_k+p)=f_k+p^T\nabla f_k+\frac12p^T B_k p$$</p>
</li>
</ul>
<p>  where$f_k,\nabla f_k$,and$B_k$are a scalar,vector,and matrix,respectively . The matrix $B_k$ is either the Hessian $\nabla ^2 f_k$or some approximation to it. </p>
<h3 id="Search-directions-for-line-search-methods"><a href="#Search-directions-for-line-search-methods" class="headerlink" title="Search directions for line search methods"></a>Search directions for line search methods</h3><ul>
<li><p>Steepest descent direction :  $p_k=- \nabla f_k$ , this direction is orthogonal to the contours of the function .<br>In general ,any direction makes an angle of strictly less than $\frac \pi 2$ with $-\nabla f_k$ is guaranteed to produce a decrese in $f$.</p>
<p>Do not require second derivatives but sometimes can be excruciatingly slow on difficult problems. </p>
</li>
</ul>
<ul>
<li><p>Newton direction :<br> $$f(x_k+p) \approx f_k+p^T \nabla f_k +\frac 12 p^T \nabla^2 f_k p \equiv m_k(p)$$<br>Assuming $\nabla ^2 f_k $ is positive definite, solving the subproblem $\min_p m_k(p)$ by setting the derivative of $m_k(p)$  to zero. we get </p>
<p>$$p_k^N=-(\nabla^2 f_k)^{-1}\nabla f_k$$</p>
<p>Fast rate of local convergence , unsuitable when Hessian  is not positive definite and computation of Hessian can be cumbersome,error-prone and expensive .</p>
</li>
<li><p>Quasi-Newton direction:<br>Use $B_k$ approximates $\nabla^2f_k$ with the information from $g$ changes.From Taylor’s theorem, we have (with adding $\nabla^2f(x)p$and subtracting it):<br>$$\nabla f(x+p)=\nabla f(x)+\nabla^2f(x)p+\int_0^1[\nabla^2f(x+tp)-\nabla^2f(x)]p\mathrm{d}t$$</p>
<p>By setting $x=x_k$ and $p=x_{k+1}-x_k$ ,we obtain</p>
<p>$$\nabla f_{k+1}=\nabla f_k+\nabla^2f_k(x_{k+1}-x_k)+o(||x_{k+1}-x_k||) $$</p>
<p>so we can write </p>
<p>$$\nabla^2f_k(x_{k+1}-x_k)\approx \nabla f_{k+1}-\nabla f_k$$</p>
<p>we choose new Hessian approximation $B_NaN$ so that it satisfy the property of the true Hessian ,that is ,we require the secant equation:</p>
<p>$$B_{k+1}s_k=y_k$$</p>
<p>where </p>
<p>$$s_k=x_{k+1}-x_k, y_k=\nabla f_{k+1}-\nabla f_k$$</p>
<p>Symmetirc-rank-one(SRI) formula:</p>
<p>$$B_{k+1}=B_k+\frac{(y_k-B_ss_k)(y_k-B_ks_k)^T}{(y_k-B_ks_k)^Ts_k}$$</p>
<p>BFGS formula:</p>
<p>$$B_{k+1}=B_k+ \frac{B_k s_k s_k^T B_k}{s_k^TB_ks_k} +\frac{y_ky_k^T}{y_k^Ts_k}$$</p>
<p>The quasi-Newton search direction is :</p>
<p>$$p_k=-B_k^{-1}\nabla f_k$$</p>
</li>
<li><p>Conjugation gradient direction :</p>
<p>$$p_k=-\nabla f(x_k)+\beta_k p_{k-1}$$</p>
<p>where $\beta_k$is a scalar that ensures the $p_k$ and $p_{k-1}$ are conjugate .</p>
</li>
</ul>
<h3 id="Models-for-trust-region-methods"><a href="#Models-for-trust-region-methods" class="headerlink" title="Models for trust-region methods"></a>Models for trust-region methods</h3><p>  In trust-region subproblem , we set $B_k=0$  ,and define the trust region with Euclidean norm,then it becomes:</p>
<p>  $$\min_pf_k+p^T\nabla f_k , \text{subject to } ||p||_2\le\Delta_k$$</p>
<p>The solution is :</p>
<p>  $$p_k=-\frac{\Delta_k\nabla f_k}{||\nabla f_k||}$$</p>
<p>which is steepest descent direction is line search method.</p>

          
        
      
    </div>

    <div>
      
    </div>

    <div>
      
    </div>


    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </article>


    
      

  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
  <link itemprop="mainEntityOfPage" href="http://vancky.oschina.io/mytestblog/mytestblog/2017/02/23/NO1/">

  <span style="display:none" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <meta itemprop="name" content="Li Fan">
    <meta itemprop="description" content="">
    <meta itemprop="image" content="/mytestblog/images/avatar.gif">
  </span>

  <span style="display:none" itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
    <meta itemprop="name" content="vancky's Blog">
    <span style="display:none" itemprop="logo" itemscope itemtype="http://schema.org/ImageObject">
      <img style="display:none;" itemprop="url image" alt="vancky's Blog" src="M27.jpg">
    </span>
  </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                
                <a class="post-title-link" href="/mytestblog/2017/02/23/NO1/" itemprop="url">
                  Numerical Optimization -Introduction
                </a>
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="Post created" itemprop="dateCreated datePublished" datetime="2017-02-23T10:48:27+08:00">
                Feb 23 2017
              </time>
            

            

            
          </span>

          

          
            
          

          
          

          

          

          

        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <h3 id="Basic"><a href="#Basic" class="headerlink" title="Basic"></a>Basic</h3><ul>
<li><p>Optimization : objective (profit,time,potential energy,anything else) , variables . The goal is to find values of the variables that optimize the objective.</p>
</li>
<li><p>Variables: constrained or not .</p>
</li>
<li><p>Modeling: identifying objective ,variables ,constraints for a given problem.</p>
</li>
</ul>
<h3 id="Mathematical-formulation"><a href="#Mathematical-formulation" class="headerlink" title="Mathematical formulation:"></a>Mathematical formulation:</h3><ul>
<li><p>$x$ vector of variables, also named parameters.</p>
</li>
<li><p>$f$ objetive function , a function that we want to maximize of minimize.</p>
</li>
<li><p>$c_i$ constraint function , $x$ must satisfy</p>
<p>$ \min _{x\in  R^n} f(x)$  subject to    ${c_i =0;c_j \ge 0; i \in E;j \in I}$</p>
</li>
</ul>
<h3 id="Classify"><a href="#Classify" class="headerlink" title="Classify"></a>Classify</h3><ul>
<li>continuous versus discrete </li>
<li>constrained and unconstrained</li>
<li>global and local <h3 id="Convexity"><a href="#Convexity" class="headerlink" title="Convexity"></a>Convexity</h3> Convex set :</li>
<li>straight line segement connecting any two points is $S$ lies entirely inside $S$.</li>
<li>for any $x\in S ,y \in S$ we have $\alpha x+(1-\alpha)y \in S$ for all $\alpha \in [0,1]$.</li>
</ul>
<p>   Convex funtion:</p>
<ul>
<li>domain set $S$ is convex set</li>
<li>for any $x\in S ,y \in S$ , $f$ satisfied :<br> $f(\alpha x+(1-\alpha)y) \le \alpha f(x) + (1-\alpha)f(y)$ for all $\alpha \in [0,1]$.</li>
</ul>
<p> Convex programming or convex optimization </p>
<ul>
<li>objective function is convex</li>
<li>equality constraint function $c_i(),i \in E$ are linear</li>
<li>quality constraint function $c_j(),j\in I$are concave<br>  Any  local solution of the proble is in fact a global solution  </li>
</ul>

          
        
      
    </div>

    <div>
      
    </div>

    <div>
      
    </div>


    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </article>


    
      

  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
  <link itemprop="mainEntityOfPage" href="http://vancky.oschina.io/mytestblog/mytestblog/2017/02/15/开源项目callHorizonMatlab/">

  <span style="display:none" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <meta itemprop="name" content="Li Fan">
    <meta itemprop="description" content="">
    <meta itemprop="image" content="/mytestblog/images/avatar.gif">
  </span>

  <span style="display:none" itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
    <meta itemprop="name" content="vancky's Blog">
    <span style="display:none" itemprop="logo" itemscope itemtype="http://schema.org/ImageObject">
      <img style="display:none;" itemprop="url image" alt="vancky's Blog" src="M27.jpg">
    </span>
  </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                
                <a class="post-title-link" href="/mytestblog/2017/02/15/开源项目callHorizonMatlab/" itemprop="url">
                  开源项目callHorizonMatlab
                </a>
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="Post created" itemprop="dateCreated datePublished" datetime="2017-02-15T22:20:27+08:00">
                Feb 15 2017
              </time>
            

            

            
          </span>

          

          
            
          

          
          

          

          

          

        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <h2 id="一个小的开源项目-callHorizonMatlab"><a href="#一个小的开源项目-callHorizonMatlab" class="headerlink" title="一个小的开源项目 callHorizonMatlab"></a>一个小的开源项目 <a href="https://github.com/vancky/callHorizonMatlab" target="_blank" rel="external">callHorizonMatlab</a></h2><p>通过matlab在线调用JPL的horizons历表，是根据 <a href="https://github.com/mommermi/callhorizons" target="_blank" rel="external">callhorizons</a> python版本演变过来的，但是做了一些简化。<br>主要提供了三个方法，可以分别获取历表，轨道根数，三维向量。</p>
<h2 id="基本用法"><a href="#基本用法" class="headerlink" title="基本用法"></a>基本用法</h2><h3 id="下载-queryHorizons-m-与queryTest-m-并加入matlab的路径。"><a href="#下载-queryHorizons-m-与queryTest-m-并加入matlab的路径。" class="headerlink" title="下载 queryHorizons.m 与queryTest.m 并加入matlab的路径。"></a>下载 queryHorizons.m 与queryTest.m 并加入matlab的路径。</h3><p>运行测试方法<br><figure class="highlight matlab"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">runtests(<span class="string">'queryTest'</span>);<span class="comment">% run the test</span></div></pre></td></tr></table></figure></p>
<h3 id="初始化离散时刻点，仅仅支持jd-或者mjd，不过你可以使用cspice-来进行时间转换。"><a href="#初始化离散时刻点，仅仅支持jd-或者mjd，不过你可以使用cspice-来进行时间转换。" class="headerlink" title="初始化离散时刻点，仅仅支持jd 或者mjd，不过你可以使用cspice 来进行时间转换。"></a>初始化离散时刻点，仅仅支持jd 或者mjd，不过你可以使用<a href="http://git.oschina.net/vancky/mice" target="_blank" rel="external">cspice</a> 来进行时间转换。</h3><figure class="highlight matlab"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div></pre></td><td class="code"><pre><div class="line">target=queryHorizons(<span class="string">'499'</span>);<span class="comment">% for Mars </span></div><div class="line">target=target.set_discreteepochs([<span class="number">2457446.177083</span>, <span class="number">2457446.182343</span>,<span class="number">2457448.182343</span>]);</div><div class="line">target=target.get_ephemerides(<span class="string">'O44'</span>);<span class="comment">% lijiang Station</span></div><div class="line"><span class="comment">% you can get elements like </span></div><div class="line">target=target.get_elements() <span class="comment">% sun centered</span></div><div class="line">target=target.get_elements(<span class="string">'SSB'</span>) <span class="comment">% SSB centered</span></div></pre></td></tr></table></figure>
<h3 id="初始化等间隔时间段，只支持格式’YYYY-MM-DD-HH-MM-SS-’"><a href="#初始化等间隔时间段，只支持格式’YYYY-MM-DD-HH-MM-SS-’" class="headerlink" title="初始化等间隔时间段，只支持格式’YYYY-MM-DD [HH-MM-SS]’"></a>初始化等间隔时间段，只支持格式’YYYY-MM-DD [HH-MM-SS]’</h3><figure class="highlight matlab"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div></pre></td><td class="code"><pre><div class="line">target=queryHorizons(<span class="string">'Ceres'</span>);</div><div class="line">target=target.set_epochrange(<span class="string">'2016-02-26'</span>, <span class="string">'2016-10-25'</span>, <span class="string">'1d'</span>)</div><div class="line">target=target.get_ephemerides(<span class="string">'O44'</span>);</div><div class="line">target=target.get_vectors();<span class="comment">% get vector in (J2000,  earth mean equator plane,SSB center)</span></div></pre></td></tr></table></figure>
<h3 id="获取数据也非常简单，返回的类有个属性originSrc，其内容就是JPL返回的文档，里面有最详细最权威的资料，对结果有疑问的时候可以参考。"><a href="#获取数据也非常简单，返回的类有个属性originSrc，其内容就是JPL返回的文档，里面有最详细最权威的资料，对结果有疑问的时候可以参考。" class="headerlink" title="获取数据也非常简单，返回的类有个属性originSrc，其内容就是JPL返回的文档，里面有最详细最权威的资料，对结果有疑问的时候可以参考。"></a>获取数据也非常简单，返回的类有个属性originSrc，其内容就是JPL返回的文档，里面有最详细最权威的资料，对结果有疑问的时候可以参考。</h3><figure class="highlight matlab"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div></pre></td><td class="code"><pre><div class="line">target.originSrc <span class="comment">% the origin source from Horizon </span></div><div class="line">target.data      <span class="comment">% the formated ephemrides from source , a matlab table format </span></div><div class="line">target.official_name <span class="comment">% check the name of object</span></div><div class="line">target.getitme(<span class="string">'RA'</span>,<span class="number">1</span>)  <span class="comment">% get the first RA</span></div><div class="line">target.data&#123;<span class="number">1</span>,<span class="string">'RA'</span>&#125; <span class="comment">% the same to the up </span></div><div class="line">target.getitme(<span class="string">'RA'</span>,:)  <span class="comment">% get all RA  </span></div><div class="line">target.fields <span class="comment">% show all items</span></div></pre></td></tr></table></figure>
<h2 id="注意"><a href="#注意" class="headerlink" title="注意"></a>注意</h2><ul>
<li>get_ephemerides 方法默认站点是O44(丽江观测站),这个可以在278行设置。默认参考系J2000.</li>
<li>get_elements 方法默认中心是太阳(10)，这个可以在444行设置。默认参考系J2000，默认参考平面为平黄道与J2000平春分点。</li>
<li>get_vectors 方法默认中心是太阳系质心(0,SSB),默认参考系J2000，默认参考平面为平赤道与平春分点。</li>
</ul>

          
        
      
    </div>

    <div>
      
    </div>

    <div>
      
    </div>


    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </article>


    
      

  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
  <link itemprop="mainEntityOfPage" href="http://vancky.oschina.io/mytestblog/mytestblog/2017/02/14/TEST/">

  <span style="display:none" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <meta itemprop="name" content="Li Fan">
    <meta itemprop="description" content="">
    <meta itemprop="image" content="/mytestblog/images/avatar.gif">
  </span>

  <span style="display:none" itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
    <meta itemprop="name" content="vancky's Blog">
    <span style="display:none" itemprop="logo" itemscope itemtype="http://schema.org/ImageObject">
      <img style="display:none;" itemprop="url image" alt="vancky's Blog" src="M27.jpg">
    </span>
  </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                
                <a class="post-title-link" href="/mytestblog/2017/02/14/TEST/" itemprop="url">
                  TEST
                </a>
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="Post created" itemprop="dateCreated datePublished" datetime="2017-02-14T14:39:27+08:00">
                Feb 14 2017
              </time>
            

            

            
          </span>

          

          
            
          

          
          

          

          

          

        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <ol>
<li>安装nodejs, 官网，直接安装即可。</li>
<li><p>cmd 中查看nodejs是否安装好</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$  node -v</div></pre></td></tr></table></figure>
</li>
<li><p>设置npm源</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$  npm config set registry http://registry.cnpmjs.org</div></pre></td></tr></table></figure>
</li>
<li><p>安装hexo</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ npm install hexo-cli -g</div></pre></td></tr></table></figure>
</li>
<li><p>新建文章</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$hexo new &quot;Test&quot;</div></pre></td></tr></table></figure>
</li>
</ol>

          
        
      
    </div>

    <div>
      
    </div>

    <div>
      
    </div>


    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </article>


    
      

  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
  <link itemprop="mainEntityOfPage" href="http://vancky.oschina.io/mytestblog/mytestblog/2017/02/14/hello-world/">

  <span style="display:none" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <meta itemprop="name" content="Li Fan">
    <meta itemprop="description" content="">
    <meta itemprop="image" content="/mytestblog/images/avatar.gif">
  </span>

  <span style="display:none" itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
    <meta itemprop="name" content="vancky's Blog">
    <span style="display:none" itemprop="logo" itemscope itemtype="http://schema.org/ImageObject">
      <img style="display:none;" itemprop="url image" alt="vancky's Blog" src="M27.jpg">
    </span>
  </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                
                <a class="post-title-link" href="/mytestblog/2017/02/14/hello-world/" itemprop="url">
                  Hello World
                </a>
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="Post created" itemprop="dateCreated datePublished" datetime="2017-02-14T14:23:51+08:00">
                Feb 14 2017
              </time>
            

            

            
          </span>

          

          
            
          

          
          

          

          

          

        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <p>Welcome to <a href="https://hexo.io/" target="_blank" rel="external">Hexo</a>! This is your very first post. Check <a href="https://hexo.io/docs/" target="_blank" rel="external">documentation</a> for more info. If you get any problems when using Hexo, you can find the answer in <a href="https://hexo.io/docs/troubleshooting.html" target="_blank" rel="external">troubleshooting</a> or you can ask me on <a href="https://github.com/hexojs/hexo/issues" target="_blank" rel="external">GitHub</a>.</p>
<h2 id="Quick-Start"><a href="#Quick-Start" class="headerlink" title="Quick Start"></a>Quick Start</h2><h3 id="Create-a-new-post"><a href="#Create-a-new-post" class="headerlink" title="Create a new post"></a>Create a new post</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ hexo new <span class="string">"My New Post"</span></div></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/writing.html" target="_blank" rel="external">Writing</a></p>
<h3 id="Run-server"><a href="#Run-server" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ hexo server</div></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/server.html" target="_blank" rel="external">Server</a></p>
<h3 id="Generate-static-files"><a href="#Generate-static-files" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ hexo generate</div></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/generating.html" target="_blank" rel="external">Generating</a></p>
<h3 id="Deploy-to-remote-sites"><a href="#Deploy-to-remote-sites" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ hexo deploy</div></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/deployment.html" target="_blank" rel="external">Deployment</a></p>

          
        
      
    </div>

    <div>
      
    </div>

    <div>
      
    </div>


    <footer class="post-footer">
      

      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </article>


    
  </section>

  

          
          </div>
          


          

        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    <div class="sidebar-inner">

      

      

      <section class="site-overview sidebar-panel sidebar-panel-active">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
          <img class="site-author-image" itemprop="image"
               src="/mytestblog/images/avatar.gif"
               alt="Li Fan" />
          <p class="site-author-name" itemprop="name">Li Fan</p>
          <p class="site-description motion-element" itemprop="description">About astronomy ,auto observatory ,asteroids ,ccd image process , machine learning!</p>
        </div>
        <nav class="site-state motion-element">
        
          
            <div class="site-state-item site-state-posts">
              <a href="/mytestblog/archives">
                <span class="site-state-item-count">5</span>
                <span class="site-state-item-name">日志</span>
              </a>
            </div>
          

          

          
            <div class="site-state-item site-state-tags">
              <a href="/mytestblog/tags">
                <span class="site-state-item-count">2</span>
                <span class="site-state-item-name">标签</span>
              </a>
            </div>
          

        </nav>

        

        <div class="links-of-author motion-element">
          
        </div>

        
        

        
        

        


      </section>

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright" >
  
  &copy; 
  <span itemprop="copyrightYear">2017</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Li Fan</span>
</div>


<div class="powered-by">
  由 <a class="theme-link" href="https://hexo.io">Hexo</a> 强力驱动
</div>

<div class="theme-info">
  主题 -
  <a class="theme-link" href="https://github.com/iissnan/hexo-theme-next">
    NexT.Pisces
  </a>
</div>


        

        
      </div>
    </footer>

    <div class="back-to-top">
      <i class="fa fa-arrow-up"></i>
    </div>
  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  




  
  <script type="text/javascript" src="/mytestblog/lib/jquery/index.js?v=2.1.3"></script>

  
  <script type="text/javascript" src="/mytestblog/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>

  
  <script type="text/javascript" src="/mytestblog/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>

  
  <script type="text/javascript" src="/mytestblog/lib/velocity/velocity.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/mytestblog/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/mytestblog/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>


  


  <script type="text/javascript" src="/mytestblog/js/src/utils.js?v=5.1.0"></script>

  <script type="text/javascript" src="/mytestblog/js/src/motion.js?v=5.1.0"></script>



  
  


  <script type="text/javascript" src="/mytestblog/js/src/affix.js?v=5.1.0"></script>

  <script type="text/javascript" src="/mytestblog/js/src/schemes/pisces.js?v=5.1.0"></script>



  

  


  <script type="text/javascript" src="/mytestblog/js/src/bootstrap.js?v=5.1.0"></script>



  



  




	





  





  





  



  
  

  
  
    <script type="text/x-mathjax-config">
      MathJax.Hub.Config({
        tex2jax: {
          inlineMath: [ ['$','$'], ["\\(","\\)"]  ],
          processEscapes: true,
          skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
        }
      });
    </script>

    <script type="text/x-mathjax-config">
      MathJax.Hub.Queue(function() {
        var all = MathJax.Hub.getAllJax(), i;
        for (i=0; i < all.length; i += 1) {
          all[i].SourceElement().parentNode.className += ' has-jax';
        }
      });
    </script>
    <script type="text/javascript" src="//cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
  


  

  

  


</body>
</html>
